//returndetail.js

Page({
  data: {
    returnType:'1',
    returnState: '1',
    orderLogistics: true,
    animationData: {}
  },
  onLoad: function () {
    let that = this;
    
  },
  returnGoods: function () {
     wx.navigateTo({
        url: '/packageA/pages/returngoods/returngoods'
    })
  },
  logistics: function () {
    wx.navigateTo({
        url: '/packageA/pages/logistics/logistics'
    })
  },
  contactSellers: function () {
    wx.makePhoneCall({
        phoneNumber: '11111'
    })
  },
  orderLogistics: function () {
    let that = this;
    that.setData({
      orderLogistics: false
      }, () => {
        let animation = wx.createAnimation({
            duration: 500,
            timingFunction: 'ease'
        })
         that.animation = animation 
         setTimeout(function(){
           that.big();
        },200)
    })
  },
  orderLogisticsClose: function () {
    let that = this;
    that.setData({
      orderLogistics: true
      }, () => {
        let animation = wx.createAnimation({
            duration: 500,
            timingFunction: 'ease'
        })
         that.animation = animation 
         setTimeout(function(){
           that.small();
        },200)
    })
  },
  big: function () {
    let that = this;
    that.animation.scale(1).step()
    that.setData({
      animationData: that.animation.export()
    })
  },
  small: function () {
    let that = this;
    that.animation.scale(0).step()
    that.setData({
      animationData: that.animation.export()
    })
  }
})